package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysClassAndStudentMapper;
import com.ruoyi.system.domain.SysClassAndStudent;
import com.ruoyi.system.service.ISysClassAndStudentService;
import com.ruoyi.common.core.text.Convert;

/**
 * 班级和学生关联Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-14
 */
@Service
public class SysClassAndStudentServiceImpl implements ISysClassAndStudentService 
{
    @Autowired
    private SysClassAndStudentMapper sysClassAndStudentMapper;

    /**
     * 查询班级和学生关联
     * 
     * @param csId 班级和学生关联主键
     * @return 班级和学生关联
     */
    @Override
    public SysClassAndStudent selectSysClassAndStudentByCsId(String csId)
    {
        return sysClassAndStudentMapper.selectSysClassAndStudentByCsId(csId);
    }

    /**
     * 查询班级和学生关联列表
     * 
     * @param sysClassAndStudent 班级和学生关联
     * @return 班级和学生关联
     */
    @Override
    public List<SysClassAndStudent> selectSysClassAndStudentList(SysClassAndStudent sysClassAndStudent)
    {
        return sysClassAndStudentMapper.selectSysClassAndStudentList(sysClassAndStudent);
    }

    /**
     * 新增班级和学生关联
     * 
     * @param sysClassAndStudent 班级和学生关联
     * @return 结果
     */
    @Override
    public int insertSysClassAndStudent(SysClassAndStudent sysClassAndStudent)
    {
        return sysClassAndStudentMapper.insertSysClassAndStudent(sysClassAndStudent);
    }

    /**
     * 修改班级和学生关联
     * 
     * @param sysClassAndStudent 班级和学生关联
     * @return 结果
     */
    @Override
    public int updateSysClassAndStudent(SysClassAndStudent sysClassAndStudent)
    {
        return sysClassAndStudentMapper.updateSysClassAndStudent(sysClassAndStudent);
    }

    /**
     * 批量删除班级和学生关联
     * 
     * @param csIds 需要删除的班级和学生关联主键
     * @return 结果
     */
    @Override
    public int deleteSysClassAndStudentByCsIds(String csIds)
    {
        return sysClassAndStudentMapper.deleteSysClassAndStudentByCsIds(Convert.toStrArray(csIds));
    }

    /**
     * 删除班级和学生关联信息
     * 
     * @param csId 班级和学生关联主键
     * @return 结果
     */
    @Override
    public int deleteSysClassAndStudentByCsId(String csId)
    {
        return sysClassAndStudentMapper.deleteSysClassAndStudentByCsId(csId);
    }
}
